﻿using System;
using System.Collections.Generic;

namespace CS_2_10
{
    class Program
    {
        static void Main()
        {
            int count = 0;
            List<int> numbers = new List<int>();

            for (int i = 1; i <= 4; i++)
            {
                for (int j = 1; j <= 4; j++)
                {
                    for (int k = 1; k <= 4; k++)
                    {
                        if (i != j && i != k && j != k)
                        {
                            int number = i * 100 + j * 10 + k;
                            numbers.Add(number);
                            count++;
                        }
                    }
                }
            }

            Console.WriteLine($"能组成 {count} 个互不相同且无重复数字的三位数：");
            foreach (int num in numbers)
            {
                Console.Write(num + " ");
            }
        }
    }
}